X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/2af83e98005a14c439b360a5b9ac636f594d9f0c..74c155708d85abfc2cf227c08de4f27003015b3f:/Super%20Polarity/ActorFactory.cs diff --git a/Super Polarity/ActorFactory.cs b/Super Polarity/ActorFactory.cs index 3e2f80b..3a2dbab 100644 --- a/Super Polarity/ActorFactory.cs +++ b/Super Polarity/ActorFactory.cs @@ -10,7 +10,7 @@ namespace SuperPolarity { static class ActorFactory { - static internal Game Game; + static internal SuperPolarity Game; static public MainShip CreateMainShip(Vector2 position) { @@ -48,9 +48,22 @@ namespace SuperPolarity return ship; } - internal static void SetGame(Game game) + internal static void SetGame(SuperPolarity game) { ActorFactory.Game = game; } + + internal static Bullet CreateBullet(Vector2 position, float angle) + { + Bullet bullet = new Bullet(Game); + + bullet.Initialize(Game.Content.Load("Graphics\\square"), position); + + bullet.Angle = angle; + + ActorManager.CheckIn(bullet); + + return bullet; + } } }